3.3.28 \(\int \frac {a+b \log (c x^n)}{(d+e x^2)^2} \, dx\) [228]

Optimal. Leaf size=164 \[ -\frac {b n \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}-\frac {i b n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}}+\frac {i b n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}} \]

[Out]

1/2*x*(a+b*ln(c*x^n))/d/(e*x^2+d)-1/2*b*n*arctan(x*e^(1/2)/d^(1/2))/d^(3/2)/e^(1/2)+1/2*arctan(x*e^(1/2)/d^(1/
2))*(a+b*ln(c*x^n))/d^(3/2)/e^(1/2)-1/4*I*b*n*polylog(2,-I*x*e^(1/2)/d^(1/2))/d^(3/2)/e^(1/2)+1/4*I*b*n*polylo
g(2,I*x*e^(1/2)/d^(1/2))/d^(3/2)/e^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2360, 211, 2361, 12, 4940, 2438} \begin {gather*} -\frac {i b n \text {PolyLog}\left (2,-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}}+\frac {i b n \text {PolyLog}\left (2,\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}}+\frac {\text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}-\frac {b n \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e*x^2)^2,x]

[Out]

-1/2*(b*n*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(d^(3/2)*Sqrt[e]) + (x*(a + b*Log[c*x^n]))/(2*d*(d + e*x^2)) + (ArcTan[
(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/(2*d^(3/2)*Sqrt[e]) - ((I/4)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sqrt[d]]
)/(d^(3/2)*Sqrt[e]) + ((I/4)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(d^(3/2)*Sqrt[e])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2360

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^2)^(q_), x_Symbol] :> Simp[(-x)*(d + e*x^2)^(q +
1)*((a + b*Log[c*x^n])/(2*d*(q + 1))), x] + (Dist[(2*q + 3)/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*(a + b*Log[
c*x^n]), x], x] + Dist[b*(n/(2*d*(q + 1))), Int[(d + e*x^2)^(q + 1), x], x]) /; FreeQ[{a, b, c, d, e, n}, x] &
& LtQ[q, -1]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{\left (d+e x^2\right )^2} \, dx &=\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\int \frac {a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{2 d}-\frac {(b n) \int \frac {1}{d+e x^2} \, dx}{2 d}\\ &=-\frac {b n \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}-\frac {(b n) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e} x} \, dx}{2 d}\\ &=-\frac {b n \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}-\frac {(b n) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{2 d^{3/2} \sqrt {e}}\\ &=-\frac {b n \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}-\frac {(i b n) \int \frac {\log \left (1-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{4 d^{3/2} \sqrt {e}}+\frac {(i b n) \int \frac {\log \left (1+\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{4 d^{3/2} \sqrt {e}}\\ &=-\frac {b n \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 d \left (d+e x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 d^{3/2} \sqrt {e}}-\frac {i b n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}}+\frac {i b n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 d^{3/2} \sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.34, size = 289, normalized size = 1.76 \begin {gather*} \frac {1}{4} \left (\frac {a+b \log \left (c x^n\right )}{d \left (\sqrt {-d} \sqrt {e}+e x\right )}+\frac {a+b \log \left (c x^n\right )}{(-d)^{3/2} \sqrt {e}+d e x}+\frac {b d n \left (\log (x)-\log \left (\sqrt {-d}-\sqrt {e} x\right )\right )}{(-d)^{5/2} \sqrt {e}}+\frac {b n \left (\log (x)-\log \left (\sqrt {-d}+\sqrt {e} x\right )\right )}{(-d)^{3/2} \sqrt {e}}+\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2} \sqrt {e}}+\frac {d \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{5/2} \sqrt {e}}+\frac {b d n \text {Li}_2\left (\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{5/2} \sqrt {e}}+\frac {b n \text {Li}_2\left (\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2} \sqrt {e}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*x^2)^2,x]

[Out]

((a + b*Log[c*x^n])/(d*(Sqrt[-d]*Sqrt[e] + e*x)) + (a + b*Log[c*x^n])/((-d)^(3/2)*Sqrt[e] + d*e*x) + (b*d*n*(L
og[x] - Log[Sqrt[-d] - Sqrt[e]*x]))/((-d)^(5/2)*Sqrt[e]) + (b*n*(Log[x] - Log[Sqrt[-d] + Sqrt[e]*x]))/((-d)^(3
/2)*Sqrt[e]) + ((a + b*Log[c*x^n])*Log[1 + (Sqrt[e]*x)/Sqrt[-d]])/((-d)^(3/2)*Sqrt[e]) + (d*(a + b*Log[c*x^n])
*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)])/((-d)^(5/2)*Sqrt[e]) + (b*d*n*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/((-d)^(5/2
)*Sqrt[e]) + (b*n*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/((-d)^(3/2)*Sqrt[e]))/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.14, size = 685, normalized size = 4.18

method result size
risch \(\frac {b x \ln \left (x^{n}\right )}{2 d \left (e \,x^{2}+d \right )}-\frac {b \arctan \left (\frac {x e}{\sqrt {e d}}\right ) n \ln \left (x \right )}{2 d \sqrt {e d}}+\frac {b \arctan \left (\frac {x e}{\sqrt {e d}}\right ) \ln \left (x^{n}\right )}{2 d \sqrt {e d}}-\frac {b n \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}+\frac {b n \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right ) x^{2} e}{4 d \left (e \,x^{2}+d \right ) \sqrt {-e d}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right ) x^{2} e}{4 d \left (e \,x^{2}+d \right ) \sqrt {-e d}}+\frac {b n \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{4 \left (e \,x^{2}+d \right ) \sqrt {-e d}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{4 \left (e \,x^{2}+d \right ) \sqrt {-e d}}+\frac {b n \dilog \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{4 \sqrt {-e d}\, d}-\frac {b n \dilog \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{4 \sqrt {-e d}\, d}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{4 d \sqrt {e d}}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x}{4 d \left (e \,x^{2}+d \right )}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{4 d \left (e \,x^{2}+d \right )}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x}{4 d \left (e \,x^{2}+d \right )}+\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x}{4 d \left (e \,x^{2}+d \right )}-\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{4 d \sqrt {e d}}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{4 d \sqrt {e d}}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{4 d \sqrt {e d}}+\frac {b \ln \left (c \right ) x}{2 d \left (e \,x^{2}+d \right )}+\frac {b \ln \left (c \right ) \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}+\frac {a x}{2 d \left (e \,x^{2}+d \right )}+\frac {a \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}\) \(685\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(e*x^2+d)^2,x,method=_RETURNVERBOSE)

[Out]

1/2*b*x/d/(e*x^2+d)*ln(x^n)-1/2*b/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))*n*ln(x)+1/2*b/d/(e*d)^(1/2)*arctan(x*e
/(e*d)^(1/2))*ln(x^n)-1/2*b*n/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))+1/4*b*n*ln(x)/d/(e*x^2+d)/(-e*d)^(1/2)*ln(
(-e*x+(-e*d)^(1/2))/(-e*d)^(1/2))*x^2*e-1/4*b*n*ln(x)/d/(e*x^2+d)/(-e*d)^(1/2)*ln((e*x+(-e*d)^(1/2))/(-e*d)^(1
/2))*x^2*e+1/4*b*n*ln(x)/(e*x^2+d)/(-e*d)^(1/2)*ln((-e*x+(-e*d)^(1/2))/(-e*d)^(1/2))-1/4*b*n*ln(x)/(e*x^2+d)/(
-e*d)^(1/2)*ln((e*x+(-e*d)^(1/2))/(-e*d)^(1/2))+1/4*b*n/(-e*d)^(1/2)/d*dilog((-e*x+(-e*d)^(1/2))/(-e*d)^(1/2))
-1/4*b*n/(-e*d)^(1/2)/d*dilog((e*x+(-e*d)^(1/2))/(-e*d)^(1/2))+1/4*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d/(e*d)^
(1/2)*arctan(x*e/(e*d)^(1/2))-1/4*I*b*Pi*csgn(I*c*x^n)^3*x/d/(e*x^2+d)+1/4*I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2*x/
d/(e*x^2+d)-1/4*I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*x/d/(e*x^2+d)+1/4*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^
2*x/d/(e*x^2+d)-1/4*I*b*Pi*csgn(I*c*x^n)^3/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))-1/4*I*b*Pi*csgn(I*c)*csgn(I*x
^n)*csgn(I*c*x^n)/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))+1/4*I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2/d/(e*d)^(1/2)*arc
tan(x*e/(e*d)^(1/2))+1/2*b*ln(c)*x/d/(e*x^2+d)+1/2*b*ln(c)/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))+1/2*a*x/d/(e*
x^2+d)+1/2*a/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

1/2*a*(arctan(x*e^(1/2)/sqrt(d))*e^(-1/2)/d^(3/2) + x/(d*x^2*e + d^2)) + b*integrate((log(c) + log(x^n))/(x^4*
e^2 + 2*d*x^2*e + d^2), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)/(x^4*e^2 + 2*d*x^2*e + d^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{\left (d + e x^{2}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(e*x**2+d)**2,x)

[Out]

Integral((a + b*log(c*x**n))/(d + e*x**2)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/(x^2*e + d)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{{\left (e\,x^2+d\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(d + e*x^2)^2,x)

[Out]

int((a + b*log(c*x^n))/(d + e*x^2)^2, x)

________________________________________________________________________________________